package com.qianf.qfoffice.service.impl;

import com.github.pagehelper.PageHelper;
import com.qianf.qfoffice.dao.AnonymityDao;
import com.qianf.qfoffice.entity.Anonymity;
import com.qianf.qfoffice.service.AnonymityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AnonymityServiceImpl implements AnonymityService {

    @Autowired
    private AnonymityDao anonymityDao;

    @Override
    public int addAnonymity(Anonymity anonymity) {
        return anonymityDao.addAnonymity(anonymity);
    }

    @Override
    public List<Anonymity> findAllAnonymity(Integer page, Integer limit) {

        PageHelper.startPage(page,limit);

        return anonymityDao.findAllAnonymity();
    }
}
